From d9a348dfe77c381d49f9473bca41097d12aa8f19 Mon Sep 17 00:00:00 2001 From: Robert Lipe Date: Wed, 19 Dec 2018 22:15:01 -0600 Subject: [PATCH] XmlStreamWriter: make single arg methods explicit. Drop unused methods. --- src/core/xmlstreamwriter.cc | 8 -------- src/core/xmlstreamwriter.h | 7 +++---- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/core/xmlstreamwriter.cc b/src/core/xmlstreamwriter.cc index 70c59fc21..fa74d7c31 100644 --- a/src/core/xmlstreamwriter.cc +++ b/src/core/xmlstreamwriter.cc @@ -88,14 +88,6 @@ void XmlStreamWriter::writeStartDocument() writeProcessingInstruction(QStringLiteral("xml version=\"1.0\" encoding=\"UTF-8\"")); } -// Dont emit the attribute if there's nothing interesting in it. -void XmlStreamWriter::writeOptionalAttribute(const QString& qualifiedName, const QString& value) -{ - if (!value.isEmpty()) { - QXmlStreamWriter::writeAttribute(qualifiedName, value); - } -} - // Dont emit the element if there's nothing interesting in it. void XmlStreamWriter::writeOptionalTextElement(const QString& qualifiedName, const QString& text) { diff --git a/src/core/xmlstreamwriter.h b/src/core/xmlstreamwriter.h index 829a421cf..77290cca4 100644 --- a/src/core/xmlstreamwriter.h +++ b/src/core/xmlstreamwriter.h @@ -49,11 +49,10 @@ protected: class XmlStreamWriter : public QXmlStreamWriter { public: - XmlStreamWriter(QString* string); - XmlStreamWriter(QFile* f); + explicit XmlStreamWriter(QString* string); + explicit XmlStreamWriter(QFile* f); - void writeStartDocument(void); - void writeOptionalAttribute(const QString& qualifiedName, const QString& value); + void writeStartDocument(); void writeOptionalTextElement(const QString& qualifiedName, const QString& text); }; -- 2.30.2